package com.qf;

import com.qf.config.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @author 何星宇
 * @version V1.0
 * @Date 2021/11/18 20:34
 */

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
public class InterfacesApplication {
    public static void main(String[] args) {
        SpringApplication.run(InterfacesApplication.class, args);
    }

    /**
     * 初始化雪花算法工具类
     * @return
     */
    @Bean
    public IdWorker idWorkerNum(){
        return new IdWorker(1,1);
    }
}
